package model;

import java.util.Date;
import javax.persistence.*;

@Entity
@Table(name = "students")
@PrimaryKeyJoinColumn(name = "id_user")
public class Student extends User {
	protected Long group;
	protected Date dateEnter;

	public Student() {
		super();
	}

	public Student(Long id, String username, String surname, String password,
			long group, Date dateEnter) {
		super(id, username, surname, password);
		this.group = group;
		this.dateEnter = dateEnter;
	}

	private static final long serialVersionUID = 1L;

	@Column(name="group")
	public Long getGroup() {
		return group;
	}

	public void setGroup(Long group) {
		this.group = group;
	}

	@Column(name="date_enter")
	@Temporal(value=TemporalType.DATE)
	public Date getDateEnter() {
		return dateEnter;
	}

	public void setDateEnter(Date dateEnter) {
		this.dateEnter = dateEnter;
	}

}
